package com.info.zhiduoduo.repository.mapper.partner;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.dto.partner.PartnerCompanyMonthlyCrowdourceCostDto;
import com.info.zhiduoduo.repository.entity.partner.PartnerCompanyMonthlyCrowdCost;

import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author bob
 * @since 2021-01-24
 */
public interface PartnerCompanyMonthlyCrowdCostMapper extends BaseMapper<PartnerCompanyMonthlyCrowdCost> {


	@Select(" select pcmcc.*,pa.realname as partnerName,c.compname " +
			" from zdd_partner_company_monthly_crowd_cost pcmcc " +
			" join zdd_partner_account pa on pa.partnerid = pcmcc.partnerid " +
			" join zdd_company c on c.compid = pcmcc.compid " +
			" where pcmcc.partner_cost_id = #{partnerCostId}")
	List<PartnerCompanyMonthlyCrowdourceCostDto> listByCostId(int partnerCostId);
}
